<?php
/**
 * 相关内容表
 * Created by PhpStorm.
 * User: soshow
 * Date: 17/4/17
 * Time: 下午5:34
 */
defined('InNcPHP') or exit('Access Invalid!');
class serviceModel extends Model{

    public static  $service_type = array('about'=>'关于我们','statement'=>'平台申明','agreement'=>'认证协议','other'=>'其他');

    public function __construct(){
        parent::__construct('service');
    }

    //列表
    public function getServiceList($condition = array(), $field = '*', $page = 0, $order = ' mc_id asc '){
        return $this->field($field)->where($condition)->page($page)->order($order)->select();
    }

    public function addService($param){
        return $this->insert($param);
    }

    public function getServiceInfo($condition = array(), $field = '*'){
        return $this->field($field)->where($condition)->find();
    }


    public function updateService($condition, $param){
        return $this->where($condition)->update($param);
    }

    // 删除
    public function delService($condition){
        return $this->where($condition)->delete();
    }


}